<%@ page language="java" contentType="text/html; charset=utf-8"
         pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ page import="avicit.platform6.commons.utils.ViewUtil"%>
<%@taglib prefix="sec" uri="/WEB-INF/tags/shiro.tld"%>
<%@page import="avicit.platform6.core.locale.PlatformLocalesJSTL"%>
<%@page import="java.util.Locale"%>
<%@page import="avicit.platform6.api.session.SessionHelper"%>
<%@page import="avicit.platform6.api.sysshirolog.impl.AfterLoginSessionProcess"%>
<%
    Object lang=session.getAttribute(AfterLoginSessionProcess.SESSION_CURRENT_LANGUAGE_CODE);
    String languageCode="zh_CN";
    if(lang!=null){
        languageCode=lang.toString();
    }
    Locale locale =SessionHelper.getLocaleByUser(request);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>语言配置</title>
    <base href="<%=ViewUtil.getRequestPath(request)%>">
    <jsp:include page="/avicit/platform6/component/common/EasyUIJsInclude.jsp"></jsp:include>
    <jsp:include page="/avicit/platform6/modules/system/commonpopup/commonSelectionHead.jsp"></jsp:include>
    <script src="static/js/platform/component/common/exteasyui.js" type="text/javascript"></script>
    <script type="text/javascript"
            src="avicit/cbb/techclass/tabledefine/commtempletmanager/locale/language_<%=languageCode%>.js"></script>
</head>
<body class="easyui-layout" fit="true">
<div data-options="region:'center'" style="background:#ffffff;">
    <table id="dgchooseLanguage"
           data-options="
				fit: true,
				border: false,
				rownumbers: true,
				animate: true,
				collapsible: false,
				fitColumns: true,
				autoRowHeight: false,
				idField :'id',
				singleSelect: true,
				checkOnSelect: true,
				selectOnCheck: false,
				method:'get',
				striped:true">
        <thead>
        <tr>
            <th data-options="field:'id', halign:'center',hidden:true" width="220">id</th>
            <%-- 语言编号 --%>
            <th data-options="field:'sysLanguageCode', required:true,align:'center'"  width="220"><span style="color:red;">*</span><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.libstructuredefine.structureDefine.i18n.table.lanugeageNo","i18n.lantop",locale)%></th>
            <%-- 语言名称 --%>
            <th data-options="field:'sysLanguageName',required:true,align:'center'"  width="220"><span style="color:red;">*</span><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.libstructuredefine.structureDefine.i18n.table.lanugeageName","i18n.lantop",locale)%></th>
            <th data-options="field:'columnsShowName',align:'center',align:'center'" editor="{type:'text'}" width="220">${display}</th>
            <%-- 描述 --%>
            <th data-options="field:'description',align:'center',align:'center'" editor="{type:'text'}" width="220"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.libstructuredefine.structureDefine.i18n.table.describe","i18n.lantop",locale)%></th>
        </tr>
        </thead>
    </table>
    <div id="toolbar" class="datagrid-toolbar datagrid-toolbar-extend">
        <table class="tableForm" border="0" cellspacing="1" width='100%'>
            <tr>
                <td align="right" width="60%">
                    <%-- 保存 --%>
                    <a title="<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.libstructuredefine.structureDefine.i18n.table.button.save","i18n.lantop",locale)%>" id="saveButton"  class="easyui-linkbutton" plain="false" onclick="save();" href="javascript:void(0);"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.libstructuredefine.structureDefine.i18n.table.button.save","i18n.lantop",locale)%></a>
                    <%-- 返回 --%>
                    <a title="<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.libstructuredefine.structureDefine.i18n.table.button.return","i18n.lantop",locale)%>" id="returnButton"  class="easyui-linkbutton"  plain="false" onclick="closeForm();" href="javascript:void(0);"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.libstructuredefine.structureDefine.i18n.table.button.return","i18n.lantop",locale)%></a>
                </td>
            </tr>
        </table>
    </div>
</div>

<script src="avicit/cbb/techclass/tabledefine/commtempletmanager/ChooseLanguage.js" type="text/javascript"></script>
<script type="text/javascript">
    var chooseLanguage;
    $(function(){
        chooseLanguage =new ChooseLanguage('dgchooseLanguage','${url}','form1');
    });

    function closeForm(){
        parent.closeL();
    }

    function save(){
        chooseLanguage.save('${type}');
    }

</script>
</body>
</html>